import request from '@/sheep/request';

const CommApi = {
  // 查询用户分类
  queryUserBusinCategory: (data) => {
    return request({
      url: '/relation/comm/queryUserBusinCategory',
      method: 'POST',
      data,
      custom: {
        auth: true
      },
    });
  },
  // 获取系统预设分类
  getSystemBusinCategories: (data) => {
    return request({
      url: '/relation/comm/getSystemBusinCategories',
      method: 'POST',
      data,
      custom: {
        auth: true
      },
    });
  },
  // 删除用户分类
  deleteUserBusinCategory: (data) => {
    return request({
      url: '/relation/comm/deleteUserBusinCategory',
      method: 'POST',
      data,
      custom: {
        auth: true,
        successMsg: '删除成功'
      },
    });
  },
  // 添加用户分类
  addUserBusinCategory: (data) => {
    return request({
      url: '/relation/comm/addUserBusinCategory',
      method: 'POST',
      data,
      custom: {
        auth: true,
        successMsg: '设置成功'
      },
    });
  },
  // 修改用户分类
  updateUserBusinCategory: (data) => {
    return request({
      url: '/relation/comm/updateUserBusinCategory',
      method: 'POST',
      data,
      custom: {
        auth: true,
        successMsg: '设置成功'
      },
    });
  },

  // 保存用户设置
  saveUserSetting: (data) => {
    return request({
      url: '/relation/comm/saveUserSetting',
      method: 'POST',
      data,
      custom: {
        auth: true
      },
    });
  },

  // 查询用户分类
  queryUserSetting: (data) => {
    return request({
      url: '/relation/comm/queryUserSetting',
      method: 'POST',
      data,
      custom: {
        auth: true
      },
    });
  },

};

export default CommApi;
